package io.kimmking.gateway.handler;

import org.springframework.http.HttpStatus;

public enum ExceptionToHttpStatus {

    NotFoundException("NotFoundException", HttpStatus.SERVICE_UNAVAILABLE),
    ResponseStatusException("ResponseStatusException", HttpStatus.NOT_FOUND),
    Exception("Exception", HttpStatus.INTERNAL_SERVER_ERROR),
    UnsupportedOperationException("UnsupportedOperationException", HttpStatus.UNAUTHORIZED);

    private final String exceptionClassName;
    private final HttpStatus httpStatus;

    ExceptionToHttpStatus (String exceptionClassName, HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
        this.exceptionClassName = exceptionClassName;
    }

    public HttpStatus httpStatus() {
        return httpStatus;
    }

    public String exceptionClassName() {
        return exceptionClassName;
    }
}